const UserKey = 'UserKey'
const TokenKey = 'TokenKey'
export function getTokenLocal() {
	return sessionStorage.getItem(TokenKey)
}
export function setTokenLocal(token) {
	return sessionStorage.setItem(TokenKey, token)
}
export function removeTokenLocal() {
	return sessionStorage.removeItem(TokenKey)
}

export function getUserLocal() {
	let user = localStorage.getItem(UserKey)
	return user ? JSON.parse(user) : {}
}
export function setUserLocal(user) {
	return localStorage.setItem(UserKey, JSON.stringify(user))
}
export function removeUserLocal() {
	return localStorage.removeItem(UserKey)
}